package com.zy.openchat.core.model.group;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

@Deprecated
public class BasicGroupFullInfo implements Parcelable {
    public String group_description;
    //User identifier of the creator of the group; 0 if unknown.
    public long creator_user_id;
    public List<GroupMemberInfo> members;
    //Invite link for this group; available only after it has been generated at least once and only for the group creator.
    public String invite_link;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.group_description);
        dest.writeLong(this.creator_user_id);
        dest.writeList(this.members);
        dest.writeString(this.invite_link);
    }

    public BasicGroupFullInfo() {
    }

    protected BasicGroupFullInfo(Parcel in) {
        this.group_description = in.readString();
        this.creator_user_id = in.readLong();
        this.members = new ArrayList<GroupMemberInfo>();
        in.readList(this.members, GroupMemberInfo.class.getClassLoader());
        this.invite_link = in.readString();
    }

    public static final Creator<BasicGroupFullInfo> CREATOR = new Creator<BasicGroupFullInfo>() {
        @Override
        public BasicGroupFullInfo createFromParcel(Parcel source) {
            return new BasicGroupFullInfo(source);
        }

        @Override
        public BasicGroupFullInfo[] newArray(int size) {
            return new BasicGroupFullInfo[size];
        }
    };
}
